class_name  LabelDemo
extends Label

func _init():
	_loadFont();

	self.text = "中文测试demo........";

	self.align = ALIGN_CENTER
	self.uppercase = true;
	# self.percent_visible = 0.5

	self.rect_size = Vector2(30,20)
	self.clip_text = true;

	print(self.get_line_count())
	print(self.get_line_height())
	print(get_total_character_count());
	print(get_visible_line_count())


func _loadFont():
	var dynamic_font = DynamicFont.new()
	dynamic_font.font_data = load("res://assets/fonts/FZKTK.TTF")
	dynamic_font.size = 32
	self.set("custom_fonts/font", dynamic_font);
